package com.youease.chris.utils
{
	import flash.display.DisplayObject;
	
	import mx.core.UIComponent;
	
	public class MyUicomponent extends UIComponent
	{
		public var uiName:String;
		public function MyUicomponent(name:String)
		{
			this.uiName = name;
			super();
		}
		
		override public function addChild(child:DisplayObject) : DisplayObject
		{
			var obj:DisplayObject = super.addChild(child);            
			var child:DisplayObject = getChildAt(0) as DisplayObject;
			this.width = Math.max(this.width,child.width);
			this.height = Math.max(this.height, child.height);
			return obj;
		}
	}
}